/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : func.h
  * @brief          : header file of func.c.
  * @author         : Qilong Huang <jcdiyhelp@qq.com>
  * @date           : 2021-06-08 
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2021 Joy create tech(Suzhou, China) Co., Ltd.
  * All rights reserved.
  *
  *
  ******************************************************************************
  */
 /* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __FUNC_H
#define __FUNC_H

#ifdef __cplusplus
extern "C" {
#endif

/* Global include ------------------------------------------------------------*/
#include "global.h"


/* Global definition ---------------------------------------------------------*/
#define USER_APP_ADDRESS       

#define CMD_COMMON_READ         0x00
#define CMD_COMMON_WRITE        0x10

#define MESSID_LSB              0x55
#define MESSID_MSB              0xAA

/* Exported functions prototypes ---------------------------------------------*/
void FUNC_JampToApp(void);
void Error_Handler(void);
void FUNC_HardwareInit(void);
void FUNC_WaitProgram(void);
UINT16_t FUNC_CrcCheck(UINT8_t *data, UINT8_t length);
void FUNC_CommonReadRegister(TYP_SingalFrame_t *Msg);
void FUNC_CommonWriteRegister(TYP_SingalFrame_t *Msg);
void FUNC_StartProgram(void);
void FUNC_SecretWriteRegister(TYP_SingalFrame_t *Msg);
void FUNC_AppMove(void);

#ifdef __cplusplus
}
#endif

#endif /* __FUNC_H */